package com.gwq.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gwq.base.AutoEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.validation.annotation.Validated;

import javax.validation.Valid;
import javax.validation.constraints.Size;
import java.util.List;


@Data
@TableName("cm_message")
@AllArgsConstructor
@NoArgsConstructor
@Validated
public class Message extends AutoEntity<Message> {

    @ApiModelProperty("标签")
    @Valid
//    @Size(min = 0, max = 10, message = "标题不能超过10个字符")

    private String tile;

    @ApiModelProperty("正文消息")
    @Valid
//    @Size(min = 0, max = 100, message = "正文消息不能超过100个字符")
    private String message;



    @ApiModelProperty("帖子类型(1=安全 2=娱乐 3=游戏)")
    private Integer messageType;


    @ApiModelProperty("附件路径")
    @TableField(exist = false)
    private List<String> fileUrls;


    //点赞数
    @ApiModelProperty("点赞数")
    private Integer giveLike;


}
